1. Field of the Invention
The present invention relates to microcomputers which are able to convert analog signals to digital signals.
2. Description of the Prior Art
A conventional A/D converter incorporated microcomputer, which is able to convert a relatively stable analog signal, such as temperature, inputted from an external circuit (provided on the side of the measured), into a digital signal and carries out a required process, is shown in FIG. 17. The microcomputer 18 has four analog signal input terminals 2a-2d for receiving four analog input signals 1a-1d; a selector 3 for selecting one of the analog signal input terminals 2a-2d and outputting the selected analog signal 4; an A/D converter 5 for converting the analog signal 4 into a digital signal 8 (having a number of bits corresponding to the resolution); a reference voltage input terminal 7 for receiving a reference voltage 6 for use in A/D conversion; four storage units or registers 9a-9d for holding the digital signal 8 corresponding to the selected analog input terminal; a central processing unit (CPU) 12; an internal bus 10 for carrying information between the registers 9a-9d and the CPU 12; and a control circuit 13d for controlling the selector 3 with a selection information or 2-bit coded digital signal 14, the A/D converter 5 with an A/D conversion start signal 15, and the registers 9a-9d with latch signals 1a-1d and receiving an A/D conversion finish signal from the A/D converter 5.
In operation, in response to the selection information 14 generated by the control circuit 13d, the selector 3 selects one of the analog signals 1a-1d inputted at the analog input terminals 2a-2d and outputs the selected signal 4 to the A/D converter 5. In response to the A/D conversion start signal 15 from the control circuit 13d, the A/D converter 5 converts the analog signal 4 into a digital signal 8 with reference to the reference voltage 6 inputted to the reference voltage input terminal 7 and outputs, upon completion of the conversion, both an A/D conversion finish signal 19 to the control circuit 13d and the digital signal 8 to the registers 9a-9d. In response to the latch signal 11a-11d outputted by the control circuit 13d corresponding to the selected analog signal input terminal 2a-2d, the register 9a-9d holds the digital signal 8. The CPU 12 outputs a read command to one of the registers 9a-9d via the internal bus 10, and the selected register sends its contents to the CPU 12. Thus, the control circuit 13d generates and outputs the selection information 14 and the A/D conversion start signal 15 to the selector 3 and the A/D converter 5, respectively, and receives the conversion finish signal 19 from the A/D converter 5, and then outputs the latch signal 11a-11d to one of the registers 9a-9d corresponding to the selection information 14 for holding the digital signal 8.
FIGS. 18 and 19 show the operation of the conventional microcomputer, wherein like reference characters denote like or corresponding parts of FIG. 17. In response to the conversion start signal 15, the A/D converter 5 converts the analog input signals 1a-1d into digital signals 8a-8d. In response to digital selection signals 14a-14d, the selector 3 selects respective analog signal input terminals 2a-2d.
As shown in FIG. 18, when changes of the analog input signals 1a-1d are relatively small, it is possible to convert the analog input signals 1a-1d into digital signals without losing much information.
As shown in FIG. 19, when changes of the analog input signals 1a-1d are large, it is necessary to not only synchronize the A/D conversion start signal 15 with the timing indicated by the hatching at which the analog input signals 1a-1d are to be converted into digital signals but also match the selection information 14 generated by the also match the selection information 14 generated by the microcomputer 18 with one of the analog signal input terminals 2a-2d to be selected (or the analog input signal to be converted).
Consequently, it is only possible to perform A/D conversion for analog signals varying with the time to a relatively large extent with the timing and selection information that are generated within the microcomputer, thus failing to provide a flexible A/D conversion capability without losing much information.